package com.learn.springmvc.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@Scope("prototype")
@RequestMapping("/user")
public class LoginController {
	@RequestMapping(value = "/login.do")
	public String login(HttpServletRequest request, Model model, HttpServletResponse response) {

		String userName = request.getParameter("username");

		System.out.println("输入的内容为:" + userName);
		model.addAttribute("userName", userName);
		return "business";

	}
}
